package org.other.test1720;

import java.util.Objects;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @Author yu
 * @Date 2022/7/1
 */
public class Test {

    public static void main(String[] args) {

        Pattern p = Pattern.compile("([a-zA-Z_]*)");
        String candidate = "er89898";
        Matcher m = p.matcher(candidate);

        String s1 = "Programming";
        String s2 = new String("Programming");
        String s3 = "Program";
        String s4 = "ming";
        String s5 = "Program" + "ming";
        String s6 = s3 + s4;
        System.out.println(s1 == s2);
        System.out.println(s1 == s5);
        System.out.println(s1 == s6);
        System.out.println(s1 == s6.intern());
        System.out.println(s2 == s2.intern());

    }

}
